-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flip it if you can't collapse it #8609
Open
sloriot
wants to merge
12
commits into
CGAL:5.6.x-branch
Choose a base branch
from
sloriot:PMP-flip_if_cant_collapse
base: 5.6.x-branch
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MaelRL
reviewed
Nov 22, 2024
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h
Outdated
Show resolved
Hide resolved
Here are some changes: - Avoid a lot of redundant calls of is_it_a_needle / is_it_a_cap - Do not test for cap-ness if it's already a needle - Do not fill both ranges at the beginning, but fill with everything: on the first round, needle-ness will be tested, and the exit towards cap-ness will happen - Wait for a needle to no longer be a needle, or not be treatable to actually test cap-ness - When the mesh is modified, do not test everything immediately, just put them in the queue of the next iteration Result: Fewer calls to shape predicates - master - needle calls = 828 668 cap calls = 803 330 - PR - needle calls = 803 554 cap calls = 795 317 Should be fewer but two effects are balacing each other for the calls: - much fewer calls to shape predicates (is_it_a_needle, is_it_a_cap) by not calling until absolutely necessary (but still checking at pop time). - when we modify the mesh, I no longer fill the CURRENT cap and needle ranges, but the next ones. The point is to really prioritize all caps BEFORE treating needles, whereas otherwise we would treat some needles at the current iteration while there are still caps to treat. So there are more iterations which add more useless calls (see below)
Here are some changes:
Result: Fewer calls to shape predicates; for example
Should be fewer but the base there is a fixed base cost at 735k faces and two effects are balancing each other for the calls:
|
--> make the output of the function idempotent
sloriot
added a commit
that referenced
this pull request
Dec 10, 2024
…8651) ## Summary of Changes Fix an action not being in the correct menu. ![image](https://github.com/user-attachments/assets/3bf28234-3927-4def-9182-a923ce8d10a4) Not done in #8609 because that PR targets 5.6. ## Release Management * Affected package(s): `Lab` * Issue(s) solved (if any): - * Feature/Small Feature (if any): - * License and copyright ownership: no change
MaelRL
approved these changes
Dec 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
if a needle is also a cap, it will be handled as a needle only. But if we can't collapse the edge, a flip will not be tried. Try the flip too.
Note that this will slow down the method as the status of a triangle is tested twice.
Fix #8605